import java.util.Arrays;

public class Test {
    public static void move(char pos1,char pos2){
        System.out.print(pos1+"->"+pos2+" ");
    }
    public static void hanoi(int n,char pos1,char pos2,char pos3){
        if(n==1){
            move(pos1,pos3);
        }
        else{
            hanoi(n-1,pos1,pos3,pos2);
            move(pos1,pos3);
            hanoi(n-1,pos2,pos1,pos3);
        }
    }
    public static void main(String[] args) {
        hanoi(3,'A','B','C');
    }
   /* public static int[]transform(int[]arr,int key){

        for (int i = 0; i < arr.length ; i++) {
            for (int j =i+1; j < arr.length; j++) {
                if(arr[i]+arr[j]==key){
                   int []ret={i,j};
                   return ret;
                }
            }
        }
        return null;
    }
    public static void main(String[] args) {
        int[]nums={2,7,11,15};
        int[]ret=transform(nums,17);
        System.out.println(Arrays.toString(ret));
    }*/
    /*public static void main(String[] args) {
        int[]arr={1,2,34,3,4,5,7,23,12};
        boolean ret=false;
        for (int i = 0; i < arr.length-3; i++) {
            if(arr[i]%2!=0&&arr[i+1]%2!=0&&arr[i+2]!=0){
                ret=true;
                break;
            }
        }
        System.out.println(ret);
        }*/
       /* for (int i = 0; i < arr.length; i++) {
            int count=1;
            for(int j=i+1;j< arr.length;j++){
                if(arr[i]==arr[j]){
                    count++;
                }
            }
            if(count> arr.length/2){
                System.out.println(arr[i]);
                break;
            }
           else{
               count=0;
            }
        }
    }*/
   /* public static void main(String[] args) {
        int[]arr={4,1,2,1,2};
        int ret=0;

        for (int i = 0; i < arr.length; i++) {
            ret^=arr[i];
        }
        System.out.println(ret);
    }*/
    /*public static int[]bubble(int[]arr){
        for (int i = 0; i <arr.length-1; i++) {
            for(int j=0;j< arr.length-i-1;j++){
                if(arr[i]>arr[i+1]){
                    int tmp=arr[i];
                    arr[i]=arr[i+1];
                    arr[i+1]=tmp;
                }
            }
        }
        return arr;
    }
    public static void main(String[] args) {
        int[]arr={1,3,2,4,8,7};
        int[]ret=bubble(arr);
        System.out.println(Arrays.toString(ret));
    }*/
    /*public static int binary(int[]arr,int  key){
        int left=0;
        int right=arr.length-1;
        while(left<=right){
            int mid=(left+right)/2;
            if(arr[mid]==key){
                return mid;
            }
            else if(arr[mid]>key){
                right=mid-1;
            }
            else{
                left=mid+1;
            }
        }
        return -1;
    }
    public static void main(String[] args) {
        int[]arr={1,2,3,4,5,6,7};
        int ret=binary(arr,3);
        System.out.println(ret);
    }*/
   /* public static int[] transform(int[]arr){
        int left=0;
        int right= arr.length-1;
        while(left<right)
        {
            while(arr[left]%2!=0&&left<right){
                left++;
            }
            while(arr[right]%2==0&&left<right){
                right--;
            }
            if(left<right)
            {
                int tmp=arr[left];
                arr[left]=arr[right];
                arr[right]=tmp;
            }
        }
        return arr;
    }
    public static void main(String[] args) {
        int[]arr={1,2,3,4,5,6};
        int[]ret=transform(arr);
        System.out.println(Arrays.toString(ret));
    }*/
    /*public static int[] transform(int[]arr){
        for (int i = 0; i <arr.length ; i++) {
            arr[i]=arr[i]*2;
        }
        return arr;
    }

    public static void main1(String[] args) {
        int[]arr={1,2,3};
        int[]ret=transform(arr);
        System.out.println(Arrays.toString(ret));
    }*/
}
